export const state = () => ({
	operatorCode: localStorage.getItem('operator_code'),
	dialogueId: '', // 当前对话id
  docIdList: [], // 当前展示的文件id
	markChunkInfo: {}, // 当前需要高亮的信息
	markIndex: [0, 0, 0], // 高亮的消息索引
});

export const mutations = {
	// 设置账号
	setOperatorCode(state, data) {
		state.operatorCode = data
		localStorage.setItem('operator_code', data)
	},
	// 设置当前对话id
	setDialogueId(state, data) {
		state.dialogueId = data
		localStorage.setItem('cid', data)
	},
	// 设置当前展示的文件id
  setDocIdList(state, data) {
		state.docIdList = data
  },
	// 设置高亮信息
	setMarkChunkInfo(state, data) {
		state.markChunkInfo = data
	},
	// 设置高亮的消息索引
	setMarkIndex(state, data) {
		state.markIndex = data
	}
};
